const uilts = require("../utils.js");
const fs = require("fs");
const config = {
  inDir: "F:/测试",
  outDir: "F:/测试",
};

let files = fs.readdirSync(config.inDir);

files.forEach((file, index) => {
  let curPath = config.inDir + "/" + file;
  if (file.endsWith(".html") && !file.endsWith("_index.html") && !fs.statSync(curPath).isDirectory()) {
    let html = fs.readFileSync(curPath, "utf-8");
    let md = uilts.htmlToMarkdown(html);
    console.log(md)
  }
});